package com.better.rabbit;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2017/9/21.
 */
@Component
public class SendText {
    @Autowired
    private AmqpTemplate template;
    public void send() {
        template.convertAndSend("queue","hello,rabbit~");
    }
}
